<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./js/vue.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
<style>
    .yangyang-enter-active{
        transform: translateX(100px);
        transition: all 5s;
    }
    .yangyang-enter{
        opacity: 0;
    }
    .yangyang-enter-to{
        opacity: 1;
    }
    /* .yangyang-leave{
        opacity: 1;
    }
    .yangyang-leave-to{
        opacity: 0;
    }
    .yangyang-leave-active{
        transform: rotateX(45deg);
        transition: 5s;
    } */
    .niuniu-leave-active{
        animation: anima 5s linear;
    }
    .niuniu-enter-active{
        animation: anima 6s linear;
    }

    @keyframes anima{
        0%{
            transform: translateX(0px) scale(0);
        }
        100%{
            transform: translateX(100px) scale(2);
        }
    }
</style>
<body>
    <div class="box">
        <!-- <transition name="yangyang">
            <h1 v-if="flag">{{msg}}</h1>
        </transition> -->
        <button @click="flag = !flag">显示隐藏</button>
       <!--  <transition name="niuniu">
            <h1 v-if="flag">多喝热水，治百病，心态要平和</h1>
        </transition> -->

        <!-- 
            enter-class
            enter-active-class
            enter-to-class
            leave-class
            leave-active-class
            leave-to-class


         -->
         <transition enter-active-class="animate__animated animate__bounce" leave-active-class="animate__animated animate__rollOut">
           <h1 v-if="flag">洋洋翻跟斗</h1>
         </transition>
    </div>
    <script>
        let vm = new Vue({
            el:'.box',
            data:{
                msg:'css3过渡和动画',
                flag:true
            }
        })
    </script>
</body>
</html>